import request from '@/utils/request'

export function allTree() {
  return request({
    url: 'api/sysMenu/allTree'
  })
}
export function tree() {
  return request({
    url: 'api/sysMenu/tree',
    method: 'get'
  })
}
export function buildMenus() {
  return request({
    url: 'api/sysMenu/treeMenu',
    method: 'get'
  })
}

export function modifySysMenu(data) {
  return request({
    url: 'api/sysMenu/modifySysMenu',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/sysMenu/'+ids,
    method: 'delete',
  })
}

export function edit(data) {
  return request({
    url: 'api/sysMenu',
    method: 'post',
    data
  })
}

export default { modifySysMenu, del, allTree }
